home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Carousel
/
CAROUSEL.cdr
/
mactosh
/
util
/
simulare.sit
/
Simula 4.07 Reference
/
card_11780.txt
< prev
next >
Wrap
Text File
|
1989-05-02
|
3KB
|
124 lines
-- card: 11780 from stack: in.07 Reference
-- bmap block id: 12522
-- flags: 0000
-- background id: 13647
-- name:
-- part 1 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=22 top=114 right=133 bottom=86
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 22
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name:
-- part 2 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=106 top=113 right=133 bottom=227
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 22
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name:
-- part 3 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=108 top=143 right=163 bottom=229
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 22
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name:
-- part 4 (field)
-- low flags: 00
-- high flags: 0000
-- rect: left=233 top=112 right=164 bottom=444
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name:
-- part 5 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=13 top=289 right=311 bottom=97
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Utilities
----- HyperTalk script -----
on mouseUp
go to card id 26098
end mouseUp
-- part contents for background part 1
----- text -----
A text variable may reference a part of a text, a frame:
Text-object Text variable
text procedure SUB(i,n); integer i,n; Returns a reference to a part of the text of
length n, starting at the i:th character. T.SUB(5.2) will return a
reference to the sub-string "EF" above.
text procedure STRIP; Returns a reference to a sub-string where all trailing spaces
and tabs have been skipped.
text procedure MAIN; This is the inverse of SUB and STRIP - returns a reference to
the full string. T.SUB(5,2).MAIN==T
integer procedure START; Returns the index within the MAIN-string of where the
SUB-string starts: T.SUB(5,2).START=5.
-- part contents for background part 2
----- text -----
Text attributes - sub-strings
-- part contents for card part 1
----- text -----
ABCDEFGH
-- part contents for card part 2
----- text -----
Pos=1, Length=8
-- part contents for card part 3
----- text -----
Pos=1, Length=2
-- part contents for card part 4
----- text -----
T after T:-"ABCDEFGH"
S after S:-T.SUB(5,2)